package com.flyme.common.security.util;

/**
 * Created by xinxingegeya on 2017/5/25.
 */
public class SecurityUtils {
    public static final String USER_SESSION_LOGIN_KEY = "loginKey";
    public static final String USER_SESSION_USER_INFO_KEY = "userInfoKey";

    public static Object getSubject() {
        return ThreadContext.get(USER_SESSION_USER_INFO_KEY);
    }

    public static void bindSubject(Object subject) {
        ThreadContext.put(USER_SESSION_USER_INFO_KEY, subject);
    }

    public static void removeSubject() {
        ThreadContext.remove(USER_SESSION_USER_INFO_KEY);
    }
}



